Skip to content

vulkan-utils-spirv: New package#647

Merged
dpwiz merged 3 commits into
mainfrom
utils-reflect
Jul 5, 2026
Merged

vulkan-utils-spirv: New package#647
dpwiz merged 3 commits into
mainfrom
utils-reflect

Conversation

@dpwiz

@dpwiz dpwiz commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Compile-time generation of Haskell types and stuff using SPIR-v bytecode reflection.

dpwiz and others added 3 commits July 2, 2026 13:53
Compile-time generation of Haskell types and stuff
using SPIR-v bytecode reflection.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The reflect examples and the vulkan-utils-spirv test suite consumed
committed .spv files produced by out-of-band build-shaders.sh scripts,
which broke CI on a fresh checkout (the .spv were gitignored, and two
fixtures had no GLSL source at all). Shaders are now compiled at build
time by the vulkan-utils GLSL quasiquoters and reflected from the
embedded bytes; the scripts, shader files and file-embed dependency are
gone.

vulkan-utils-spirv gains the missing Bytes variants for the stage TH:
reflectStageSigBytes and reflectPipelineLayoutSigBytes, mirroring
reflectShaderTypesBytes.

Each example is restructured around per-pipeline modules whose
<Pipeline>.Shader submodule holds the quasiquoted SPIR-V (satisfying the
TH stage restriction) and whose pipeline module reflects it and builds
the pipeline; Main does the setup and Render the headless frame:

  * compute-reflect:   Main, Render, Julia(.Shader)
  * mesh-reflect:      Main, Render, Mesh(.Shader)
  * texture-reflect:   Main, Render, Tri(.Shader), Cube(.Shader)
  * pathtrace-reflect: Main, Render, Scene, Pathtracer(.Shader)

The pathtracer and bda shaders use compileShaderQ with a vulkan1.2
target (buffer_reference), wide.comp with vulkan1.1 (Int64). The
sourceless julia.comp and tri.vert fixtures are reconstructed from the
test suite's layout assertions, which pin them exactly.

All four examples render correctly (mesh/texture self-checks pass) and
the 75 vulkan-utils-spirv tests pass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@dpwiz dpwiz marked this pull request as ready for review July 5, 2026 13:31
@dpwiz dpwiz merged commit 577b4b1 into main Jul 5, 2026
12 of 17 checks passed
@dpwiz dpwiz deleted the utils-reflect branch July 5, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant